package com.itlong.cloud.iottp;

import com.itlong.cloud.POJO.PO.DeviceEntranceInfoPO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <desc>
 *      设备在线接口。
 * <desc/>
 *
 * @createDate 2019/07/03.
 */
@FeignClient(name = "iot-tp-service")
public interface IIotDeviceOnlineServiceClient {

    /**
     * <desc>
     *      维护在线设备缓存
     * <desc/>
     *
     * @return
     * @author Qiang.S
     * @createDate 2018/07/13
     */
    @RequestMapping(path = "/iotTp/online/timeTaskMaintenanceOnline",method = RequestMethod.POST)
    void timeTaskMaintenanceOnline();

    /**
     * <desc>
     *      根据设备编号查询本组所有设备
     * <desc/>
     *
     * @return
     * @author Qiang.S
     * @createDate 2020/02/25
     */
    @RequestMapping(path = "/iotTp/online/getAllDoorByDeviceUnique",method = RequestMethod.POST)
    List<DeviceEntranceInfoPO> getAllDoorByDeviceUnique(@RequestParam("deviceUnique") String deviceUnique);

    /**
     * <desc>
     *      根据设备编号查询没有创建主门禁的设备编号
     * <desc/>
     *
     * @return
     * @author Qiang.S
     * @createDate 2020/02/25
     */
    @RequestMapping(path = "/iotTp/online/getDoorByGroup",method = RequestMethod.POST)
    List<DeviceEntranceInfoPO> getDoorByGroup(@RequestParam("deviceUnique") String deviceUnique);

    /**
     * <desc>
     *      获取京东设备id
     * </desc>
     *
     * @param deviceUnique
     * @param deviceType
     * @return
     * @author Jiaqi.X
     * @createDate 2020/08/11
     */
    @RequestMapping(path = "/iotTp/online/getJdDeviceId",method = RequestMethod.POST)
    String getJdDeviceId(@RequestParam("deviceUnique") String deviceUnique,@RequestParam("deviceType") Integer deviceType);

    /**
     * <desc>
     *      维护在线设备缓存
     * <desc/>
     *
     * @return
     * @author caoshuai
     * @createDate 2020/09/25
     */
    @RequestMapping(path = "/iotTp/online/timeTaskHWMaintenanceOnline",method = RequestMethod.POST)
    void timeTaskHWMaintenanceOnline();

}
